/**
 * 
 */
package org.cuatrovientos.erp.model;

import java.sql.Date;
import java.sql.Timestamp;

import javax.validation.constraints.Past;
import javax.validation.constraints.Size;

/**
 * @author Daniel Lacasta
 *
 */
public class Message {
	
	private int id;
	
	@Size(min=1,max=50,message="{message.title.error}")
	private String title;
	
	@Past(message="{message.date.error}")
	private java.sql.Timestamp date;
	
	@Size(message="{message.message.error}")
	private String message;
	
	@Size(message="{message.iduser.error}")
	private int iduser;
	
	public Message () {
		
	}

	
	/**
	 * @param id
	 * @param title
	 * @param date
	 * @param message
	 * @param iduser
	 */
	public Message(int id, String title, Timestamp date, String message, int iduser) {
		this.id = id;
		this.title = title;
		this.date = date;
		this.message = message;
		this.iduser = iduser;
	}


	





	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}


	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}


	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}


	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}


	/**
	 * @return the date
	 */
	public java.sql.Timestamp getDate() {
		return date;
	}


	/**
	 * @param date the date to set
	 */
	public void setDate(java.sql.Timestamp date) {
		this.date = date;
	}


	/**
	 * @return the message
	 */
	public String getMessage() {
		return message;
	}


	/**
	 * @param message the message to set
	 */
	public void setMessage(String message) {
		this.message = message;
	}


	/**
	 * @return the iduser
	 */
	public int getIduser() {
		return iduser;
	}


	/**
	 * @param iduser the iduser to set
	 */
	public void setIduser(int iduser) {
		this.iduser = iduser;
	}


	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Shipment [id=" + id + ", title=" + title
				+ ", date=" + date + ", date=" + date
				+ ", message=" + message + "]";
	}
	
	

}
